// import type { EventHandler, EventHandlerRequest } from "h3";

// export const defineWrappedResponseHandler = <T extends EventHandlerRequest, D>(
//   handler: EventHandler<T, D>,
// ): EventHandler<T, D> =>
//     defineEventHandler<T>(async (event) => {
//       try {
//         const response = await handler(event);
//         return { response };
//       }
//       catch (err) {
//       // Error handling
//         return { err };
//       }
//     });

export const Level = {
  all: -1, // 保留
  beginner: 0,
  junior: 1,
  middle: 2,
  senior: 3,
} as const

export function wrapToPayLoad<T>(raw_data: T): ReqPayLoad<T> {
  return { data: raw_data }
}
